import 'package:json_annotation/json_annotation.dart'; 
  
part 'my_point.g.dart';


List<MyPoint> getMyPointList(List<dynamic> list){
    List<MyPoint> result = [];
    list.forEach((item){
      result.add(MyPoint.fromJson(item));
    });
    return result;
  }
@JsonSerializable()
  class MyPoint extends Object {

  @JsonKey(name: 'coinCount')
  int coinCount;

  @JsonKey(name: 'date')
  int date;

  @JsonKey(name: 'desc')
  String desc;

  @JsonKey(name: 'id')
  int id;

  @JsonKey(name: 'reason')
  String reason;

  @JsonKey(name: 'type')
  int type;

  @JsonKey(name: 'userId')
  int userId;

  @JsonKey(name: 'userName')
  String userName;

  MyPoint(this.coinCount,this.date,this.desc,this.id,this.reason,this.type,this.userId,this.userName,);

  factory MyPoint.fromJson(Map<String, dynamic> srcJson) => _$MyPointFromJson(srcJson);

  Map<String, dynamic> toJson() => _$MyPointToJson(this);

}

  
